<template>
  <div class="work-box">
    <div class="work-box-item" v-for="item in options" :key="item.value">
      <div class="count">{{ data[item.value] || 0 }}</div>
      <div class="desc">{{ item.name }}</div>
      <img src="@/assets/images/bigScreen/countBg.png" alt="">
    </div>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      options: [
        {
          name: '作业车辆',
          value: 'carCount',
        },
        {
          name: '作业人员',
          value: 'employeeCount',
        },
      ],
    };
  },
  methods: {},
}
</script>

<style scoped lang="scss">
.work-box {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  &-item {
    height: 100%;
    font-weight: bolder;
    text-align: center;
    position: relative;
    width: 50%;
    .count {
      font-size: 22px;
      color: #22f2ff;
    }
    .desc {
      font-size: 12px;
      color: #fff;
      margin: 2px 0;
    }
    img {
      height: 130%;
      object-fit: cover;
      position: absolute;
      bottom: -20%;
      left: 50%;
      transform: translateX(-50%);
    }
  }
}
</style>
